package com.sto.stoapp.activity.scanner;

import com.sto.stoapp.activity.R;
import com.sto.stoapp.widget.StoHomeActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class StoUploadMainActivity extends StoHomeActivity {
	private String busiType;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		super.setContentView(R.layout.upload_main_layout);
		Bundle extras = getIntent().getExtras();
		busiType = extras.getString("busiType");
		this.setTitleBottom(R.string.record_upload, busiType);
		findViewById(R.id.unupload_button).setOnClickListener(
				new OnClickListener() {

					@Override
					public void onClick(View v) {
						turnTo(StoUnUploadDataActivity.class);
					}
				});
		findViewById(R.id.upload_error_button).setOnClickListener(
				new OnClickListener() {

					@Override
					public void onClick(View v) {
						turnTo(ErrorRecordActivity.class);
					}
				});
	}

	private void turnTo(Class<?> c) {
		Intent intent = new Intent(this, c);
		intent.putExtra("busiType", busiType);
		startActivity(intent);
	}
}
